import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '@/views/Index.vue'
import Login from '@/views/Login.vue'
import Search from '@/views/Search.vue'
import UserCenter from '@/views/UserCenter.vue'
import Detail from '@/views/Detail.vue'
import ShoppingCart from '@/views/ShoppingCart'
import OrderList from '@/views/OrderList'
import UserFavorite from "../views/UserFavorite";
import BrowseHistory from "../views/BrowseHistory";
import Register from "../views/Register.vue";

const routes = [
  {
    path: '/',
    name: 'Index',
    component: Index
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/search',
    name: 'Search',
    component: Search
  },
  {
    path: '/usercenter',
    name: 'UserCenter',
    component: UserCenter
  },
  {
    path:'/userfavorite',
    name:'UserFavorite',
    component: UserFavorite
  },
  {
    path:'/BrowseHistory',
    name: 'BrowseHistory',
    component: BrowseHistory
  },
  {
    path: '/detail',
    name: 'Detail',
    component: Detail
  },
  {
    path:'/ShoppingCart',
    name:'ShoppingCart',
    component:ShoppingCart
  },
  {
    path:'/OrderList',
    name:'OrderList',
    component:OrderList
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
